// 字体
// @import url("https://cdnjs.cloudflare.com/ajax/libs/lxgw-wenkai-screen-webfont/1.7.0/lxgwwenkaiscreenr.css");

@font-face {
  font-family: "logo";
  src: url("./logo.ttf") format("truetype");
}

@keyframes loading-2-anim {
  0% {
    width: 0;
  }
  30% {
    width: 5px;
  }
  60% {
    width: 10px;
  }
  90% {
    width: 15px;
  }
  100% {
    width: 15px;
  }
}

:root {
  --my-preset-line-height-1: 1.8;
  --my-preset-letter-spacing-1: 0.04em;
  --my-preset-color-font-1: #444444;
  --my-preset-color-font-2: #333333;
  --my-preset-color-font-3: #000000;
  --my-preset-color-bg-1: #ffffff;
  --my-preset-color-bg-2: #fbfbfb;
  --my-preset-color-bg-3: #1f1e2c;
  --my-preset-color-alert-bg: #ffffff;
  --my-preset-color-button-bg-1: #ffffff;
  --my-preset-color-button-font-1: #f96b4d;
  --my-preset-color-button-bg-active: #f96b4d;
  --my-preset-color-active: #f96b4d;
  --my-preset-color-active-hover: #f5ad6e;
  --my-preset-color-font-gray-1: #9f9f9f;
  --my-preset-color-font-gray-2: #cdcdcd;
  --my-preset-color-font-gray-3: #888888;
  --my-preset-color-border-1: #d8d8d8;
  --my-preset-color-border-2: #cccccc;
  --my-preset-color-border-3: #eeeeee;
  --my-preset-color-bg-gray-1: #f8f8f8;
  --my-preset-color-bg-gray-2: #fbfbfb;
  --my-font-family-1: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Source Han Sans CN, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
  --my-font-family-2: NotoSerifSC, "Microsoft Yahei", 宋体, sans-serif;
  --my-font-family-3: 'Helvetica','Microsoft Yahei', '冬青黑体简体中文 w3', 微软雅黑,'Tahoma','Arial','SimSun';
  // --my-font-family-3: "LXGW WenKai Screen R", Microsoft YaHei UI, Microsoft YaHei;
  --my-preset-color-scrollbar-thumb: #d2d2d2;
  --my-preset-color-scrollbar-track: rgba(51, 51, 51, 0.1);
  * {
    box-sizing: border-box;
  }
}

/* 系统主题色 dark */
[data-user-color-scheme='dark']{
  --my-preset-color-bg-1: #1f1e2c;
  --my-preset-color-bg-2: #1a1927;
  --my-preset-color-bg-3: #0b0b10;
  --my-preset-color-alert-bg: #262631;
  --my-preset-color-font-1: #d5d5d5;
  --my-preset-color-font-2: #f5f5f5;
  --my-preset-color-font-3: #ffffff;
  --my-preset-color-border-3: #3f3d55;
  --my-preset-color-button-bg-1: #f96b4d;
  --my-preset-color-button-bg-active: #f5ad6e;
  --my-preset-color-button-font-1: #f5f5f5;
  --my-preset-color-bg-gray-1: #2e2d3b;
  --my-preset-color-font-gray-3: #a9a9a9;
  --my-preset-color-border-2: #aaaaaa;
  --my-preset-color-scrollbar-thumb: #3b3b5f;
  --my-preset-color-scrollbar-track: #1f1e2c;
}

article,
aside,
audio,
b,
blockquote,
body,
center,
code,
dd,
div,
dl,
dt,
em,
footer,
form,
h1,
h2,
h3,
h4,
h5,
h6,
header,
html,
i,
label,
li,
mark,
menu,
nav,
ol,
p,
pre,
section,
span,
strong,
sub,
table,
time,
ul,
video {
  margin: 0;
  padding: 0;
  outline: 0;
  border: 0;
  vertical-align: baseline;
  font: inherit;
  font-size: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

a,
button,
.btn {
  color: inherit;
  text-decoration: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  &:hover {
    color: #f96b4d;
    /* text-decoration: underline; */
  }
}

h1 {
  line-height: 1.1;
  color: var(--my-preset-color-font-2);
  letter-spacing: 2px;
  font-size: 32px;
  font-weight: 700;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-thumb {
  background: var(--my-preset-color-scrollbar-thumb);
  border-radius: 5px;
}
::-webkit-scrollbar-track {
  background: var(--my-preset-color-scrollbar-track);
}
pre::-webkit-scrollbar {
  height: 10px;
}
pre::-webkit-scrollbar-thumb {
  background: var(--my-preset-color-scrollbar-thumb);
  border-radius: 5px;
}

body {
  font-family: var(--my-font-family-1);
  background: var(--my-preset-color-bg-1);
  position: relative;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  max-width: 100vw;
  padding: 0;
  transition: .3s transform;
  font-size: 15px;
  font-weight: 400;
  color:  var(--my-preset-color-font-1);
  letter-spacing:  var(--my-preset-letter-spacing-1);
  line-height: var(--my-preset-line-height-1);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  &.show-mobile-menu{
    transform: translateX(50vw);
    overflow: hidden;
    position: fixed;
  }
  .container {
    margin: auto;
    max-width: 1000px;
    padding: 0 20px;
    box-sizing: content-box;
  }
  .my-loading-1 {
    text-align: center;
  }
  .my-loading-2 {
    width: 15px;
    display: inline-block;
    text-align: left;
    i {
      animation: loading-2-anim 2s infinite;
      overflow: hidden;
      width: 5px;
      display: inline-block;
      font-size: 18px;
      line-height: 12px;
      font-family: unset;
    }
  }
}

/* ---------header---------- */
#TopNav {
  position: relative;
  height: 54px;
  padding: 50px 0 60px;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: var(--my-preset-color-bg-1);
  &.fixed {
    position: fixed;
    padding: 0;
    border-bottom: 1px solid var(--my-preset-color-border-3);
    -webkit-transition: all 0.1s;
    -moz-transition: all 0.1s;
    -o-transition: all 0.1s;
    transition: all 0.1s;
    &+.container{
      padding-top: 110px
    }
  }
  #VMobileMenu{
    display: none;
    .menu-btn{
      height: 54px;
      display: flex;
      align-items: center;
      width: 50px;
      justify-content: center;
      margin-left: -15px;
      svg.icon path{
        fill: var(--my-preset-color-font-gray-1);
      }
    }
    .menu-cont{
      position: fixed;
      left: -50vw;
      top: 0;
      height: 100vh;
      width: 50vw;
      .title{
        padding: 10px 10%;
        background: var(--my-preset-color-bg-3);
        color: #FBFBFB;
        font-size: 1.2em;
        line-height: 34px;
      }
      i.close{
        position: absolute;
        padding: 14px 20px;
        line-height: 26px;
        top: 0;
        right: 0;
        color: #FBFBFB;
        font-size: 20px;
        cursor: pointer;
        font-family: var(--my-font-family-2);
      }
      ul.menu-list{
        height: calc(100% - 54px);
        overflow-y: auto;
        li{
          a{
            display: block;
            padding: 10px 10%;
            border-bottom: 1px solid var(--my-preset-color-border-3);
            word-break: keep-all;
            overflow: hidden;
            text-overflow: ellipsis;
            &:hover,&:active {
              background: var(--my-preset-color-active);
              color: #FBFBFB;
            }
          }
        }
      }
    }
    .mask{
      position: fixed;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, .2);
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
    }
  }
  & > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
  }
  .left {
    width: 150px;
    height: 100%;
    & > .logo {
      height: 100%;
      display: flex;
      align-items: center;
      line-height: 1;
      & > a {
        font: 400 28px logo;
        color: var(--my-preset-color-font-2);
        word-break: keep-all;
      }
    }
  }
  .right {
    width: calc(100% - 150px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    & > ul.menu-list > li {
      display: inline-block;
      margin: 0 10px;
      & > a {
        color: var(--my-preset-color-font-gray-1);
        &:hover{
          color:#f96b4d;
        }
      }
    }
    & > #VSearch {
      height: 100%;
      width: 36px;
      margin-right: -15px;
    }
  }
}

/* ---------header-search-window---------- */
@mixin m-svg {
  webkit-transition: fill 0.3s ease-in-out;
  -moz-transition: fill 0.3s ease-in-out;
  -o-transition: fill 0.3s ease-in-out;
  transition: fill 0.3s ease-in-out;
  &:hover {
    fill: #f96b4d !important;
  }
}
.search-icon {
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  svg {
    fill: var(--my-preset-color-font-gray-1);
    @include m-svg;
  }
}
.search-window {
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background-color: var(--my-preset-color-bg-1);
  transform-origin: top right;
  overflow: hidden;
  transition: all 0.5s;
  transform: scale(0);
  opacity: 0;
  form.search-form {
    position: relative;
    width: 80%;
    height: 90px;
    margin: 200px 10% 0 10%;
    input {
      padding: 0 95px 0 20px;
      font-size: 4em;
      height: 100%;
      width: calc(100% - 115px);
      border: none;
      outline: 0;
      color: var(--my-preset-color-font-1);
      border-bottom: 1px solid #e2dfdf;
      background: var(--my-preset-color-bg-1);
    }
    button {
      position: absolute;
      right: 0;
      bottom: 0;
      outline: 0;
      border: none;
      background: unset;
      height: 100%;
      width: 90px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      svg {
        fill: var(--my-preset-color-font-gray-3);
        width: 40px;
        height: 40px;
        @include m-svg;
      }
    }
  }
  .close-search {
    position: absolute;
    cursor: pointer;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    svg {
      fill: var(--my-preset-color-font-gray-3);
      width: 30px;
      height: 30px;
      @include m-svg;
    }
  }
}

/* ---------footer---------- */
#VBackToTop {
  position: fixed;
  bottom: 60px;
  right: 40px;
  z-index: 999;
  .back-to-top-icon {
    width: 35px;
    height: 35px;
    padding: 10px;
    box-sizing: content-box;
    cursor: pointer;
    transition: opacity 0.5s;
    opacity: 0;
    path{
      fill:var(--my-preset-color-font-1);
    }
    &.show {
      opacity: 1;
    }
  }
}
#VSetColorScheme{
  height: 100%;
  width: 40px;
  display: flex;
  align-items: center;
  cursor: pointer;
  svg.icon{
    padding: 10px;
    box-sizing: content-box;
    path{
      fill:var(--my-preset-color-font-gray-1);
    }
  }
}
footer {
  border-top: 1px solid var(--my-preset-color-border-3);
  background-color: var(--my-preset-color-bg-2);
  z-index: 780;
  .t {
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    h2 {
      color: var(--my-preset-color-font-gray-1);
      font-size: 18px;
      line-height: 2.5;
    }
    ul{
      // text-align: justify;
      li {
        display: inline-block;
        margin-right: 10px;
      }
    }
    .l {
      width: 13%;
      min-width: 120px;
      img {
        margin-top: 5px;
        width: 100%;
        height: auto;
      }
    }
    .m {
      width: 40%;
    }
    .r {
      width: 30%;
    }
  }
  .b {
    background: var(--my-preset-color-bg-3);
    padding: 15px;
    text-align: center;
    .copyright {
      color: var(--my-preset-color-font-gray-1);
      line-height: 1.5;
    }
  }
}

// 适配
@media (max-width: 639px){
  h1 {
    font-size: 24px;
  }
  body{
    .container{
      padding: 0 15px
    }
  }
  footer{
    .t{
      flex-direction: column;
      padding: 15px 15px 20px 15px;
      font-size: 13px;
      color: var(--my-preset-color-font-gray-1);
      h2 {
        font-size: 15px;
      }
      .l{
        display: none;
      }
      .m{
        width: 100%;
      }
      .r{
        width: 100%;
        margin-top: 15px;
      }
    }
    .b{
      .copyright{
        font-size: 13px;
      }
    }
  }
  #TopNav{
    height: 54px;
    padding: 0;
    border-bottom: 1px solid var(--my-preset-color-border-3);
    margin-bottom: 22px;
    .left{
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      width: auto;
      &>.logo>a {
        font-size: 24px;
      }
    }
    .right{
      width: auto;
      ul.menu-list{
        display: none;
      }
    }
    #VMobileMenu{
      display: block;
    }
  }
  .search-window {
    form.search-form {
      height: 40px;
      input {
        padding: 0 35px 0 5px;
        height: 40px;
        font-size: 1.5em;
        width: 100%;
      }
      button {
        width: 40px;
        svg {
          width: 24px;
          height: 24px;
        }
      }
    }
    .close-search {
      top: 20px;
      right: 20px;
      svg {
        width: 25px;
        height: 25px;
      }
    }
  }
  #VBackToTop {
    right: 10px;
    .back-to-top-icon {
      width: 30px;
      height: 30px;
    }
  }
}